Skip to content

Conversation

@Hanmac
Copy link
Contributor

@Hanmac Hanmac commented Apr 17, 2025

Description (*)

Done by Suggestion of #1216 (comment)

Related Pull Requests

  • see OpenMage/magento-lts#<issue_number>

Fixed Issues (if relevant)

Manual testing scenarios (*)

  1. ...
  2. ...

Questions or comments

Contribution checklist (*)

  • Pull request has a meaningful description of its purpose
  • All commits are accompanied by meaningful commit messages
  • All automated tests passed successfully (all builds are green)

@Hanmac Hanmac added Component: Adminhtml Relates to Mage_Adminhtml XML Layout labels Apr 17, 2025
@github-actions github-actions bot added Component: PayPal Relates to Mage_Paypal Component: Core Relates to Mage_Core Component: Catalog Relates to Mage_Catalog Template : admin Relates to admin template Component: Cms Relates to Mage_Cms Component: Reports Relates to Mage_Reports Component: AdminNotification Relates to Mage_AdminNotification Component: Sales Relates to Mage_Sales Component: Usa Relates to Mage_Usa Component: Customer Relates to Mage_Customer Component: Eav Relates to Mage_Eav Component: Page Relates to Mage_Page Component: Api PageRelates to Mage_Api Component: Captcha Relates to Mage_Captcha Component: Tag Relates to Mage_Tag Component: CurrencySymbol Relates to Mage_CurrencySymbol Component: Admin Relates to Mage_Admin Component: Widget Relates to Mage_Widget Component: Weee Relates to Mage_Weee Component: Tax Relates to Mage_Tax Component: Review Relates to Mage_Review Component: Rating Relates to Mage_Rating Component: Payment Relates to Mage_Payment Component: Oauth Relates to Mage_Oauth Component: Newsletter Relates to Mage_Newsletter Component: Index Relates to Mage_Index Component: Giftmessage Relates to Mage_Giftmessage and removed XML Layout labels Apr 17, 2025
@Hanmac
Copy link
Contributor Author

Hanmac commented Jan 6, 2026

Tested.

Add to install script?

Install script shouldn't be needed, because the standard admin theme does fallback to the new base theme.

So no changes needed

@sreichel
Copy link
Contributor

sreichel commented Jan 9, 2026

XML layout has changed.

When i switch to this branch admin login has no bg and i see old legacy theme. Until layout cache is flushed.

@theroch theroch changed the title Fix : admin theme changed by default config value Improve admin theme handling Jan 16, 2026
@theroch theroch requested a review from addison74 January 16, 2026 12:18
@addison74
Copy link
Contributor

GitHub says the branch has conflicts that must be resolved. I am not able to use the online editor for checking. Here is the file name /app/design/adminhtml/default/default/template/catalog/product/edit.phtml.

@Hanmac
Copy link
Contributor Author

Hanmac commented Jan 16, 2026

Just needs an rebase
Will do next week

@Hanmac Hanmac force-pushed the designLayoutUpdates branch from b3d605b to d9302bf Compare January 19, 2026 12:25
@addison74 addison74 requested a review from Copilot January 19, 2026 13:25
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR improves admin theme handling by restructuring the theme configuration to use a package-based approach instead of theme-based switching. The changes move the admin theme from "default/default" and "default/openmage" to a package-level selection between "default" and "openmage" packages, both using the "default" theme.

Changes:

  • Restructures admin theme configuration to use package selection instead of theme selection
  • Adds fallback logic to handle non-existent themes and parent theme layout updates
  • Updates file paths in configuration files to reflect the new "base/default" structure

Reviewed changes

Copilot reviewed 7 out of 776 changed files in this pull request and generated 6 comments.

Show a summary per file
File Description
app/design/adminhtml/base/default/etc/theme.xml Adds new theme configuration file for base/default admin theme
app/code/core/Mage/Core/Model/Layout/Update.php Implements layout update fallback for parent themes
app/code/core/Mage/Core/Model/Design/Fallback.php Adds theme existence check and fallback to default theme
app/code/core/Mage/Adminhtml/etc/config.xml Moves openmage configuration from theme to package level
app/code/core/Mage/Adminhtml/Controller/Action.php Updates theme selection logic to use package instead of theme
.phpstan.dist.neon Updates file paths from default/default to base/default
.phpstan.dist.baseline.neon Updates file paths from default/default to base/default

Hanmac and others added 2 commits January 19, 2026 14:52
theroch
theroch previously approved these changes Jan 20, 2026
Add @param Mage_Core_Model_Config_Element $updates and @return Mage_Core_Model_Config_Element to improve API documentation.

Co-authored-by: Copilot <[email protected]>
Explanation for array manipulation

Co-authored-by: Copilot <[email protected]>
theroch
theroch previously approved these changes Jan 20, 2026
theroch
theroch previously approved these changes Jan 20, 2026
Removed unnecessary docblock comments from the method.
@addison74 addison74 requested a review from Copilot January 20, 2026 09:46
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 778 changed files in this pull request and generated 5 comments.

@sonarqubecloud
Copy link

Quality Gate Failed Quality Gate failed

Failed conditions
13.6% Duplication on New Code (required ≤ 3%)
D Reliability Rating on New Code (required ≥ A)
E Security Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

@addison74 addison74 requested a review from Copilot January 20, 2026 17:26
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 9 out of 778 changed files in this pull request and generated 2 comments.

$layoutXml = null;
$elementClass = $this->getElementClass();
$updatesRoot = Mage::app()->getConfig()->getNode($area . '/layout/updates');
$updatesRoot = $this->addFallbackThemesLayoutUpdates($updatesRoot);
Copy link

Copilot AI Jan 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The new method addFallbackThemesLayoutUpdates() is called here but there is no test coverage for this new behavior. Consider adding tests to verify that layout updates from parent themes are correctly merged into the fallback chain.

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Component: Admin Relates to Mage_Admin Component: Adminhtml Relates to Mage_Adminhtml Component: AdminNotification Relates to Mage_AdminNotification Component: Api PageRelates to Mage_Api Component: Api2 Relates to Mage_Api2 Component: Authorizenet Relates to Mage_Authorizenet Component: Bundle Relates to Mage_Bundle Component: Captcha Relates to Mage_Captcha Component: Catalog Relates to Mage_Catalog Component: CatalogSearch Relates to Mage_CatalogSearch Component: Centinel Relates to Mage_Centinel Component: Cms Relates to Mage_Cms Component: Core Relates to Mage_Core Component: CurrencySymbol Relates to Mage_CurrencySymbol Component: Customer Relates to Mage_Customer Component: Dataflow Relates to Mage_Dataflow Component: Directory Relates to Mage_Directory Component: Downloadable Relates to Mage_Downloadable Component: Eav Relates to Mage_Eav Component: Giftmessage Relates to Mage_Giftmessage Component: ImportExport Relates to Mage_ImportExport Component: Index Relates to Mage_Index Component: Media Relates to Mage_Media Component: Newsletter Relates to Mage_Newsletter Component: Oauth Relates to Mage_Oauth Component: Page Relates to Mage_Page Component: Paygate Relates to Mage_Paygate Component: Payment Relates to Mage_Payment Component: PayPal Relates to Mage_Paypal Component: Rating Relates to Mage_Rating Component: Reports Relates to Mage_Reports Component: Review Relates to Mage_Review Component: Rss Relates to Mage_Rss Component: Sales Relates to Mage_Sales Component: Tag Relates to Mage_Tag Component: Tax Relates to Mage_Tax Component: Usa Relates to Mage_Usa Component: Weee Relates to Mage_Weee Component: Widget Relates to Mage_Widget phpstan Template : admin Relates to admin template

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Admin theme changed by default config value

4 participants